Use atomics for exponential histogram buckets#8057
Merged
dashpole merged 3 commits intoopen-telemetry:mainfrom Mar 17, 2026
Merged
Use atomics for exponential histogram buckets#8057dashpole merged 3 commits intoopen-telemetry:mainfrom
dashpole merged 3 commits intoopen-telemetry:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8057 +/- ##
=====================================
Coverage 81.6% 81.6%
=====================================
Files 304 304
Lines 23452 23458 +6
=====================================
+ Hits 19144 19150 +6
- Misses 3926 3927 +1
+ Partials 382 381 -1
🚀 New features to boost your workflow:
|
2e180bf to
413197e
Compare
413197e to
a36c717
Compare
dmathieu
approved these changes
Mar 16, 2026
MrAlias
reviewed
Mar 16, 2026
flc1125
reviewed
Mar 16, 2026
MrAlias
approved these changes
Mar 16, 2026
XSAM
approved these changes
Mar 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follows #8025
This is the second PR towards a lockless fast-path for the exponential histogram aggregation. It replaces use of uint64 with atomic.Uint64. It does not make buckets concurrent-safe. That will come in future PRs. This is a refactor to make future PRs easier to review since it has a large diff, but is relatively simple.
The record and measure calls are still guarded by a lock at this point.
You can see the full set of planned changes in main...dashpole:opentelemetry-go:lockless_exphist_ai. The implementation is largely based on #7535 (which I implemented by hand), but with help from an AI to break it down into smaller PRs, and simplify aspects of the design.
Part of #7796